﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="group.aspx.cs" Inherits="AnyOffice.general.person_info.group" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>用户组管理</title>
		
		<script src="/aspnet_client/core/function.js"></script>
		<script language="JavaScript">
function CheckForm()
{	
   if(document.Form1.txtGroupName.value=="")
   { 
	 alert("用户组名称不能为空！");
	 document.Form1.txtGroupName.focus();
     return (false);
   }
   
   if(document.Form1.txtGroupNo.value=="")
   { 
     alert("排序号不能为空！");
     document.Form1.txtGroupNo.focus();
     return (false);
   }
}

function delete_group(group_id)
{
 msg='确认要删除该项用户组么？';
 if(window.confirm(msg))
 {
  URL="group_delete.aspx?group_id=" + group_id;
  window.location=URL;
 }
}
		</script>
	</HEAD>
	<body class="bodycolor" topMargin="5">
		<form id="Form1" method="post" runat="server">
         <div class="main_div">
			<table class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td class="Big"><IMG src="/images/notify_new.gif" align="absMiddle"><span class="big3"> 新建用户组</span><br>
					</td>
				</tr>
			</table>
			<table width="500" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
				<TBODY>
					<tr>
						<td class="TableData" noWrap>用户组名称：</td>
						<td class="ta_txt" noWrap><asp:textbox id="txtGroupName" runat="server" MaxLength="50" Columns="30" CssClass="BigInput"></asp:textbox></td>
					<tr>
						<td class="TableData" noWrap>排序号：</td>
						<td class="ta_txt" noWrap><asp:textbox id="txtGroupNo" runat="server" MaxLength="20" Columns="20" CssClass="BigInput"></asp:textbox></td>
					</tr>
					<tr>
						<td class="bnt_con" noWrap align="center" colSpan="2"><input class="bnt01" title="添加用户组" onClick="return CheckForm();" type="submit" value="添 加"
								name="button">
						</td>
					</tr>
				</TBODY>
			</table>
			<br>
			<table class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td class="Big"><IMG src="/images/notify_open.gif" align="absMiddle"><span class="big3"> 管理用户组</span>
					</td>
				</tr>
			</table>
			<asp:repeater id="rptGroup" runat="server">
				<HeaderTemplate>
					<table width="500" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
						<TR class="TableHeader">
							<td nowrap align="center">用户组名称</td>
							<td nowrap align="center">排序号</td>
							<td nowrap align="center">操作</td>
						</TR>
				</HeaderTemplate>
				<ItemTemplate>
					<tr class="TableLine1">
						<td nowrap align="center"><%#Eval("GroupName")%></td>
						<td nowrap align="center"><%#Eval("GroupNO")%></td>
						<td nowrap align="center">
							<a href="group_set.aspx?group_id=<%#Eval("GroupId")%>">设置用户</a>&nbsp;
							<a href="group_edit.aspx?group_id=<%#Eval("GroupId")%>">编辑</a>&nbsp;
							<a href="javascript:delete_group('<%#Eval("GroupId")%>');">删除</a>
						</td>
					</tr>
				</ItemTemplate>
				<AlternatingItemTemplate>
					<tr class="TableLine2">
						<td nowrap align="center"><%#Eval("GroupName")%></td>
						<td nowrap align="center"><%#Eval("GroupNO")%></td>
						<td nowrap align="center">
							<a href="group_set.aspx?group_id=<%#Eval("GroupId")%>">设置用户</a>&nbsp;
							<a href="group_edit.aspx?group_id=<%#Eval("GroupId")%>">编辑</a>&nbsp;
							<a href="javascript:delete_group('<%#Eval("GroupId")%>');">删除</a>
						</td>
					</tr>
				</AlternatingItemTemplate>
				<FooterTemplate>
					</table>
				</FooterTemplate>
			</asp:repeater>
			<asp:Literal id="litMessage" runat="server"></asp:Literal>
			<br>
			<div align="center">
				<input class="bnt01" title="返 回" onClick="location='index.aspx'" type="button" value="返回">
			</div>
            </div>
		</form>
	</body>
</HTML>
